package com.s63.ssm.service;

import com.s63.ssm.entity.Page;
import com.s63.ssm.entity.SysUser;

import java.util.List;
import java.util.Map;

public interface UserService {
    SysUser getLogin(String account, String password) throws Exception;

    int count();
    List<SysUser> getAll();
    List<SysUser> getByRealName(String realName);
    List<SysUser> getByRealNameAndRoleId(String realName, Integer roleId);

    void getByRealNameAndRoleIdPage(String realName, Integer roleId, Page<SysUser> page);

    List<SysUser> getByUser(SysUser user);
    List<SysUser> getByMap(Map<String, Object> map);

    int add(SysUser user);
    int del(Integer id);
    int update(SysUser user);

    List<SysUser> getByRealNameAndRoleIdWithChoose(String realName, Integer roleId);

    List<SysUser> getByRealNameAndRoleIds(String realName, Integer[] roleIds);
    List<SysUser> getByRealNameAndRoleIdList(String realName, List<Integer> roleIds);

    SysUser getById(Integer valueOf);

    SysUser getByAccount(String account);
}
